﻿@using EMRI.EmergencyCare.Web.Helper
@model EMRI.EmergencyCare.Web.Helper.PatientDetailsViewModel
<fieldset>
    <legend>PatientCareRecord</legend>
    <table>
        <tr>
            <!-- <td>
                @Html.LabelFor(m => m.Patient.Location)
                
            </td>-->
            @Html.HiddenFor(m => m.Patient.Location)
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.BeforeCare)</b>
                @Html.DropDownListFor(m => m.PatientDetails.BeforeCare, new SelectList(MasterDataHelper.GetCareBeforeEmRoomArrival()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Vehicle)</b>
                @Html.DropDownListFor(m => m.PatientDetails.Vehicle, new SelectList(MasterDataHelper.GetBroughtBy()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.Patient.TypeOfEmergency)</b>
                @Html.DropDownListFor(m => m.Patient.TypeOfEmergency, new SelectList(MasterDataHelper.GetEmergencyTypes()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.CauseOfEmergency)</b>
                @Html.DropDownListFor(m => m.PatientDetails.CauseOfEmergency, new SelectList(MasterDataHelper.GetCauseEmergency()))
            </td>
        </tr>
        <tr>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.MechanismOfInjury)</b>
                @Html.DropDownListFor(m => m.PatientDetails.MechanismOfInjury, new SelectList(MasterDataHelper.GetMechanismInjury()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.IncidentLocation)</b>
                @Html.DropDownListFor(m => m.PatientDetails.IncidentLocation, new SelectList(MasterDataHelper.GetIncidentLocation()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Anatomical)</b>
                @Html.DropDownListFor(m => m.PatientDetails.Anatomical, new SelectList(MasterDataHelper.GetAnatomical()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.MCI)</b>
                @Html.DropDownListFor(m => m.PatientDetails.MCI, new SelectList(MasterDataHelper.GetMCI()))
            </td>
        </tr>
        <tr>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Age)</b>
                @Html.TextBoxFor(m => m.PatientDetails.Age, new { @maxlength = "50" })
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Sex)</b>
                @Html.DropDownListFor(m => m.PatientDetails.Sex, new SelectList(Enum.GetNames(typeof(EMRI.EmergencyCare.Web.Models.Gender))))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Contact)</b>
                @Html.TextBoxFor(m => m.PatientDetails.Contact, new { @maxlength = "12" })
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.SocialHabits)</b>
                @Html.DropDownListFor(m => m.PatientDetails.SocialHabits, new SelectList(MasterDataHelper.GetSocialHabit()))
            </td>
        </tr>
        <tr>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.District)</b>
                @Html.DropDownListFor(m => m.PatientDetails.District, new SelectList(MasterDataHelper.GetDistricts(), "ID", "Name"), new { @id = "district" })
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.Taluk)</b>
                @Html.ExtendedDropDownListFor(m => m.PatientDetails.Taluk, MasterDataHelper.GetTaluks().Select(
                    t => new ExtendedSelectListItem() { Value = t.ID.ToString(), Text = t.Name, htmlAttributes = new { @districtid = t.DistritID } })
                        , "", new { @id = "taluk" })
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.City)</b>
                @Html.CheckBoxFor(m => m.PatientDetails.DocumentCity)
                @Html.ExtendedDropDownListFor(m => m.PatientDetails.City, MasterDataHelper.GetCity().Select(
                    t => new ExtendedSelectListItem() { Value = t.ID.ToString(), Text = t.Name, htmlAttributes = new { @talukid = t.TalukID } })
                                 , "", new { @id = "city" })
            </td>


            @if (Model.PatientDetails.DocumentCity)
            {
                    
                <td>

                    <b>@Html.LabelFor(m => m.PatientDetails.TypedCityName)</b>
                    @Html.TextBoxFor(m => m.PatientDetails.TypedCityName)
                </td>   
                   
            }
        </tr>
        <tr>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.ChiefComplaint)</b>
                @Html.DropDownListFor(m => m.PatientDetails.ChiefComplaint, new SelectList(MasterDataHelper.GetChiefComplaint()))
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.IncidentNarration)</b>
                @Html.TextBoxFor(m => m.PatientDetails.IncidentNarration)
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.CaseID108)</b>
                @Html.TextBoxFor(m => m.PatientDetails.CaseID108)
                @*@Html.TextBoxFor(m => m.PatientDetails.CaseID108, new { @onkeypress = "OnlyNumeric(this);" })*@
            </td>
            <td>
                <b>@Html.LabelFor(m => m.PatientDetails.PatientInDateTime)</b>
                @Html.EditorFor(m => m.PatientDetails.PatientInDateTime)
            </td>
            <td>
                @Html.LabelFor(m => m.PatientDetails.EnteredBy)
                @Html.TextBoxFor(m => m.PatientDetails.EnteredBy)
            </td>
        </tr>
    </table>
</fieldset>
